#pragma once

#include <iacceptor.hpp>

#include <boost/asio/ip/tcp.hpp>

class ISocket;
class IAcceptorHandler;
class IIOService;

class Acceptor : public IAcceptor
{
public:
	Acceptor(IIOService& ioService);

	virtual void openBindAndListen(const std::string& address, const std::string& port) override;
	virtual void asyncAccept(std::shared_ptr<IConnection>& connection, IAcceptorHandler& accept) override;

	virtual ~Acceptor();

private:
	boost::asio::ip::tcp::acceptor m_acceptor;
};